﻿package com.firewolf.command.macrocommand;
public class ComplexRemoteControl {
	private Command onCommand;
	private Command offCommand;
	public ComplexRemoteControl(){}
	public void setCommand(Command onCommand,Command offCommand){//设置命令
		this.onCommand = onCommand;
		this.offCommand = offCommand;
	}
	/**
	 * 打开
	 */
	public void onButtonWasPressed(){
		onCommand.execute();
	}
	/**
	 * 关闭
	 */
	public void offButtonWasPressed(){
		offCommand.execute();
	}
}
